import {Component} from 'react'

export function hoc1(WrappedComponent,a,b) {
    return WrappedComponent
}

export function hoc2(WrappendComponent,options) {
    return class extends Component{
        render() {
            return <WrappendComponent {...options}/>
        }
    }
}

export function hoc3(options) {
    return function (WrappendComponent) {
        return class extends Component{
            render() {
                return <WrappendComponent {...options}/>
            }
        }
    }
}

export function hoc4(options) {
    return function (WrappendComponent) {
        return class extends Component{
            state={a:11,b:22}
            render() {
                return <WrappendComponent {...options(this.state)}/>;
            }
        }
    }
}